package org.learn.intermediate.homework;

public class HomeWork05 {
    public static void main(String[] args) {
        Aninmal cat = new Cat();
        cat.shout();
        Aninmal dog = new Dog();
        dog.shout();
    }
}
abstract class Aninmal{
    public abstract void shout();
}
class Cat extends Aninmal{
    public void shout(){
        System.out.println("猫会喵喵叫");
    }
}
class Dog extends Aninmal{
    public void shout(){
        System.out.println("狗会汪汪叫");
    }
}